package com.cenntro.common.job;

import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;
import org.springframework.util.StringUtils;

public class ElasticJobConfigCondition implements Condition{

	
	@Override
	public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
		String isOnOff = context.getEnvironment().getProperty("elaticjob.zookeeper.server-lists");
//		String groupname = context.getEnvironment().getProperty("rocketmq.producer.groupname"); 
		if(org.apache.commons.lang3.StringUtils.isNotBlank(isOnOff)){
			return true;
		}
		return false;
	}

}
